package com.luzhikun.upload_3;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
public class Test extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String realPath = this.getServletContext().getRealPath("/images");
        File file=new File(realPath);
        boolean exists = file.exists();
        System.out.println(exists);

    }
}
